﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Xml.Linq;

using Styx;
using Styx.Helpers;
using Styx.Logic;
using Styx.Logic.AreaManagement;
using Styx.Logic.BehaviorTree;
using Styx.Logic.Combat;
using Styx.Logic.Inventory;
using Styx.Logic.Inventory.Frames.Gossip;
using Styx.Logic.Inventory.Frames.Quest;
using Styx.Logic.Inventory.Frames.LootFrame;
using Styx.Logic.Pathing;
using Styx.Logic.Profiles;
using Styx.Plugins;
using Styx.Plugins.PluginClass;
using Styx.WoWInternals;
using Styx.WoWInternals.Misc;
using Styx.WoWInternals.World;
using Styx.WoWInternals.WoWObjects;

namespace AlwaysHere
{
    public class AlwaysHeree : HBPlugin
    {

        public override void Pulse()
        {
            if (StyxWoW.IsInGame)
            {
                if (intMe.IsAlive)
                {
                    if (intMe.IsAFKFlagged)
                        {
                            WoWMovement.Move(WoWMovement.MovementDirection.Forward);
                            Logging.Write("[AlwaysHere] I'm AFK flagged, Anti-Afking at " + DateTime.Now.ToString());
                        }
                    }
            }
        }
           
        public override void Initialize()
        {
            Logging.Write("AlwaysHere - Loaded Version " + Version);
        }

        private static LocalPlayer intMe { get { return ObjectManager.Me; } }
        public override string Name { get { return "AlwaysHere"; } }
        public override string Author { get { return "Giwin"; } }
        public override Version Version { get { return new Version(1, 2); } }
        public override bool WantButton { get { return false; } }
    }
}